<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="utf-8">
  

  
  <title>Huafeihua</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
  
  
  <meta property="og:type" content="website">
<meta property="og:title" content="Huafeihua">
<meta property="og:url" content="http://malone00.gitee.io/huafeihua/page/4/index.html">
<meta property="og:site_name" content="Huafeihua">
<meta property="og:locale" content="zh-CN">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Huafeihua">
  
    <link rel="alternate" href="/huafeihua/atom.xml" title="Huafeihua" type="application/atom+xml">
  
  
    <link rel="icon" href="/images/tmp.jpg">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link rel="stylesheet" href="/huafeihua/css/style.css">
  <link rel="stylesheet" href="/huafeihua/css/highlight.css">
</head>
</html>
<body>
  <div id="fullpage" class="mobile-nav-right">
    
      <div id="wrapper" title="图片来自网络">
    
    
      <header id="header">
  <div id="nav-toggle" class="nav-toggle"></div>
  <div class="head-box global-width">
    <nav class="nav-box nav-right">
      
        <a class="nav-item" href="/huafeihua/" title="">首页</a>
      
        <a class="nav-item" href="/huafeihua/categories" title="">分类</a>
      
        <a class="nav-item" href="/huafeihua/archives" title="">归档</a>
      
        <a class="nav-item" href="/huafeihua/tags" title="">标签</a>
      
        <a class="nav-item" href="/huafeihua/about" title="">关于</a>
      
    </nav>
  </div>
</header>
      <div id="middlecontent" title class="global-width sidebar-left">
        <section id="main">
  
    <article id="post-flask/创建响应，设置cookie" class="article global-container article-type-post" itemscope itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 itemprop="name">
      <a class="article-title" href="/huafeihua/2019/01/22/flask/创建响应，设置cookie/">flask-创建响应，设置cookie</a>
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/huafeihua/2019/01/22/flask/创建响应，设置cookie/" class="article-date">
  <time datetime="2019-01-22T08:58:59.000Z" itemprop="datePublished">2019-01-22</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/huafeihua/categories/python/">python</a>
  </div>

    
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/huafeihua/tags/flask/">flask</a></li></ul>

  </div>
  

  <div class="article-inner">
    
    <div class="article-content article-content-doorframe" itemprop="articleBody">
      
        
<!DOCTYPE html>
<html lang="en">
  <head><meta name="generator" content="Hexo 3.8.0">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>创建响应，设置cookie</title>
    <style type="text/css" media="all">
      body {
        margin: 0;
        font-family: "Helvetica Neue", Helvetica, Arial, "Hiragino Sans GB", sans-serif;
        font-size: 14px;
        line-height: 20px;
        color: #777;
        background-color: white;
      }
      .container {
        width: 700px;
        margin-right: auto;
        margin-left: auto;
      }

      .post {
        font-family: Georgia, "Times New Roman", Times, "SimSun", serif;
        position: relative;
        padding: 70px;
        bottom: 0;
        overflow-y: auto;
        font-size: 16px;
        font-weight: normal;
        line-height: 25px;
        color: #515151;
      }

      .post h1{
        font-size: 50px;
        font-weight: 500;
        line-height: 60px;
        margin-bottom: 40px;
        color: inherit;
      }

      .post p {
        margin: 0 0 35px 0;
      }

      .post img {
        border: 1px solid #D9D9D9;
      }

      .post a {
        color: #28A1C5;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="post">
        <h1 class="title">创建响应，设置cookie</h1>
        <div class="show-content">
          <p>下例创建了一个响应对象，然后设置了cookie：</p><p>from flask import make_response</p><p>@app.route('/')</p><p>def index():</p><p>    response = make_response('</p><h1>This document carries a cookie!</h1><p>')</p><p>    response.set_cookie('answer', '42')</p><p>    return response</p>
        </div>
      </div>
    </div>
  </body>
</html>

      
    </div>
    
  </div>
  
  
</article>

  
    <article id="post-flask/jinja模板" class="article global-container article-type-post" itemscope itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 itemprop="name">
      <a class="article-title" href="/huafeihua/2019/01/22/flask/jinja模板/">flask-jinja模板</a>
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/huafeihua/2019/01/22/flask/jinja模板/" class="article-date">
  <time datetime="2019-01-22T08:58:59.000Z" itemprop="datePublished">2019-01-22</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/huafeihua/categories/python/">python</a>
  </div>

    
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/huafeihua/tags/flask/">flask</a></li></ul>

  </div>
  

  <div class="article-inner">
    
    <div class="article-content article-content-doorframe" itemprop="articleBody">
      
        
<!DOCTYPE html>
<html lang="en">
  <head><meta name="generator" content="Hexo 3.8.0">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>jinja模板</title>
    <style type="text/css" media="all">
      body {
        margin: 0;
        font-family: "Helvetica Neue", Helvetica, Arial, "Hiragino Sans GB", sans-serif;
        font-size: 14px;
        line-height: 20px;
        color: #777;
        background-color: white;
      }
      .container {
        width: 700px;
        margin-right: auto;
        margin-left: auto;
      }

      .post {
        font-family: Georgia, "Times New Roman", Times, "SimSun", serif;
        position: relative;
        padding: 70px;
        bottom: 0;
        overflow-y: auto;
        font-size: 16px;
        font-weight: normal;
        line-height: 25px;
        color: #515151;
      }

      .post h1{
        font-size: 50px;
        font-weight: 500;
        line-height: 60px;
        margin-bottom: 40px;
        color: inherit;
      }

      .post p {
        margin: 0 0 35px 0;
      }

      .post img {
        border: 1px solid #D9D9D9;
      }

      .post a {
        color: #28A1C5;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="post">
        <h1 class="title">jinja模板</h1>
        <div class="show-content">
          <p> Jinja2变量过滤器<br></p><hr><p>过滤器名 说　　明</p><p>safe渲染值时不转义</p><p>capitalize把值的首字母转换成大写，其他字母转换成小</p><p>lower把值转换成小写形式</p><p>upper把值转换成大写形式</p><p>title把值中每个单词的首字母都转换成大写</p><p>trim把值的首尾空格去掉</p><p>striptags渲染之前把值中所有的HTML标签都删掉</p><hr><p>http://jinja.pocoo.org/docs/templates/#builtin-filters</p>
        </div>
      </div>
    </div>
  </body>
</html>

      
    </div>
    
  </div>
  
  
</article>

  
    <article id="post-flask/Flask数据库处理" class="article global-container article-type-post" itemscope="" itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 itemprop="name">
      <a class="article-title" href="/huafeihua/2019/01/22/flask/Flask数据库处理/">flask-数据库处理</a>
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/huafeihua/2019/01/22/flask/Flask数据库处理/" class="article-date">
  <time datetime="2019-01-22T08:58:59.000Z" itemprop="datePublished">2019-01-22</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/huafeihua/categories/python/">python</a>
  </div>

    
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/huafeihua/tags/flask/">flask</a></li></ul>

  </div>
  

  <div class="article-inner">
    
    <div class="article-content article-content-doorframe" itemprop="articleBody">
      
        <p>##数据的增加，删除，修改<br>数据库连接代码<br><div class="highlight-box" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true" data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br></pre></td><td class="code"><pre><span class="line">#-*-coding:GBK -*-</span><br><span class="line">from flask import Flask, redirect, render_template , url_for </span><br><span class="line">from flask.globals import request</span><br><span class="line">from flask_bootstrap import Bootstrap</span><br><span class="line">from pip._vendor.html5lib.html5parser import method_decorator_metaclass</span><br><span class="line">from sqlalchemy.sql.sqltypes import Integer</span><br><span class="line"></span><br><span class="line">app = Flask(__name__)</span><br><span class="line">from sqlalchemy import Column,Table ,String, create_engine,MetaData</span><br><span class="line">from sqlalchemy.orm import sessionmaker, relationship</span><br><span class="line">from sqlalchemy import create_engine</span><br><span class="line">from sqlalchemy.ext.declarative import declarative_base</span><br><span class="line">from sqlalchemy.sql.schema import ForeignKey</span><br><span class="line">from random import randint</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">#创建对象的基类：</span><br><span class="line">BASE = declarative_base()</span><br><span class="line">engine = create_engine(&apos;sqlite:///table.db&apos;, echo=True)  #生产上关闭echo</span><br><span class="line"></span><br><span class="line">#创建表</span><br><span class="line">def init_db():</span><br><span class="line">    BASE.metadata.create_all(engine)</span><br><span class="line"></span><br><span class="line">#删除表</span><br><span class="line">def drop_db():</span><br><span class="line">    BASE.metadata.drop_all(engine)</span><br><span class="line">    </span><br><span class="line">class User(BASE):</span><br><span class="line">    __tablename__ = &apos;users&apos;</span><br><span class="line">    </span><br><span class="line">    id = Column(Integer, primary_key=True)</span><br><span class="line">    name = Column(String(20))</span><br><span class="line">    password = Column(String(124))</span><br><span class="line">    </span><br><span class="line">    #一对多 一个用户有多个书</span><br><span class="line">    books = relationship(&apos;Book&apos;)</span><br><span class="line">    </span><br><span class="line">class Book(BASE):</span><br><span class="line">    __tablename__ = &apos;book&apos;</span><br><span class="line">    id = Column(Integer,autoincrement=True,primary_key=True )</span><br><span class="line">    name = Column(String(100))</span><br><span class="line">    </span><br><span class="line">    #“多”的一方，通过外键关联到user表的</span><br><span class="line">    user_id = Column(String(20),ForeignKey(&apos;users.id&apos;))</span><br><span class="line">Session = sessionmaker(bind=engine, autocommit=False, autoflush=False)</span><br><span class="line">init_db()</span><br><span class="line"></span><br><span class="line">session = Session()</span><br><span class="line"></span><br><span class="line">user = session.query(User)</span><br></pre></td></tr></table></figure></div></p>
<p>###1. 增加</p>
<div class="highlight-box" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true" data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">@app.route(&apos;/hello/new&apos;,methods=[&apos;GET&apos;,&apos;POST&apos;])</span><br><span class="line">def create_new_item():</span><br><span class="line">    if request.method == &apos;POST&apos;:</span><br><span class="line">        if request.form.get(&apos;g_name&apos;):</span><br><span class="line">            p_name = request.form.get(&apos;g_name&apos;)</span><br><span class="line">            new_user = User(name=p_name,password=&apos;Pwd&apos;)</span><br><span class="line">            session.add(new_user)</span><br><span class="line">            session.commit()</span><br><span class="line">            return redirect(url_for(&apos;hello_world&apos;))</span><br><span class="line">    else:</span><br><span class="line">        return render_template(&apos;additem.html&apos;)</span><br></pre></td></tr></table></figure></div>
<p>addietm.html代码<br><div class="highlight-box" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true" data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">&#123;% extends &quot;testbase.html&quot; %&#125;</span><br><span class="line">&#123;% block title %&#125;Add a new item &#123;%  endblock %&#125;</span><br><span class="line">&#123;% block body %&#125;</span><br><span class="line">&lt;h1&gt;Hello&lt;/h1&gt;</span><br><span class="line">&lt;p&gt;Welcome to my program.&lt;/p&gt;</span><br><span class="line"></span><br><span class="line">&lt;form action=&apos;/hello/new&apos; method=&apos;post&apos;&gt;</span><br><span class="line">    &lt;input type=&apos;text&apos; name=&apos;g_name&apos;&gt;&lt;/input&gt;</span><br><span class="line">    &lt;button type=&apos;submit&apos;&gt;Add&lt;/button&gt;</span><br><span class="line">&lt;/form&gt;</span><br><span class="line"></span><br><span class="line">&#123;% endblock %&#125;</span><br></pre></td></tr></table></figure></div></p>
<p>###2. 修改数据<br><div class="highlight-box" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true" data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">@app.route(&apos;/hello#&lt;int:id&gt;&apos;,methods=[&apos;GET&apos;,&apos;POST&apos;])</span><br><span class="line">def edit_item(id):</span><br><span class="line">    user = session.query(User).filter(User.id==id).one()</span><br><span class="line">    if request.method ==&apos;POST&apos;:</span><br><span class="line">        if request.form.get(&apos;g_name&apos;):</span><br><span class="line">            </span><br><span class="line">            p_name = request.form[&apos;g_name&apos;]</span><br><span class="line">            </span><br><span class="line">            user.name = p_name</span><br><span class="line">            session.commit()</span><br><span class="line">            </span><br><span class="line">            return redirect(url_for(&apos;hello_world&apos;))</span><br><span class="line">        else:</span><br><span class="line">            pass #未收到参数值的处理</span><br><span class="line">            </span><br><span class="line">    else:</span><br><span class="line">        return render_template(&apos;edititem.html&apos;, s_name = user.name,id=id)</span><br></pre></td></tr></table></figure></div></p>
<p>edititem.html代码<br><div class="highlight-box" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true" data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">&#123;% extends &quot;testbase.html&quot; %&#125;</span><br><span class="line">&#123;% block title %&#125;Edit the item &#123;%  endblock %&#125;</span><br><span class="line">&#123;% block body %&#125;</span><br><span class="line">&lt;h1&gt;Hello&lt;/h1&gt;</span><br><span class="line">&lt;p&gt;Welcome to my program.&lt;/p&gt;</span><br><span class="line"></span><br><span class="line">&lt;form action=&apos;&#123;&#123;url_for(&apos;edit_item&apos;,id=id)&#125;&#125;&apos; method=&apos;post&apos;&gt;</span><br><span class="line">    &lt;p&gt;Name:&lt;/p&gt;</span><br><span class="line">    &lt;input type=&apos;text&apos; name=&apos;g_name&apos; placeholder=&apos;&#123;&#123; s_name &#125;&#125;&apos;&gt;&lt;/input&gt;</span><br><span class="line">    &lt;button type=&apos;submit&apos;&gt;Edit&lt;/button&gt;</span><br><span class="line">&lt;/form&gt;</span><br><span class="line">&lt;a href=&apos;&#123;&#123;url_for(&apos;hello_world&apos;)&#125;&#125;&apos;&gt;Canel&lt;/a&gt;</span><br><span class="line"></span><br><span class="line">&#123;% endblock %&#125;</span><br></pre></td></tr></table></figure></div></p>
<p>###3. 删除数据<br><div class="highlight-box" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true" data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">@app.route(&apos;/hello/&lt;int:id&gt;/delete&apos;,methods=[&apos;GET&apos;,&apos;POST&apos;])</span><br><span class="line">def del_item(id):</span><br><span class="line">    user = session.query(User).filter(User.id==id).one()</span><br><span class="line">    if request.method == &apos;POST&apos;:</span><br><span class="line">        session.query(User).filter(User.id==id).delete() #这里是物理删除，生产应该为逻辑删除，修改标志位</span><br><span class="line">        session.commit()</span><br><span class="line">        return redirect(url_for(&apos;hello_world&apos;))</span><br><span class="line">    else:</span><br><span class="line">        return render_template(&apos;deleteitem.html&apos;, id = id, s_name =user.name)</span><br></pre></td></tr></table></figure></div></p>
<p>deleteitem.html代码<br><div class="highlight-box" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true" data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">&lt;html&gt;</span><br><span class="line"></span><br><span class="line">&lt;body&gt;</span><br><span class="line">&lt;h1&gt; Are you sure you want to delete &#123;&#123;s_name&#125;&#125;? &lt;/h1&gt;</span><br><span class="line"></span><br><span class="line">&lt;form action=&quot;&#123;&#123; url_for(&apos;del_item&apos;,id = id)&#125;&#125;&quot; method = &apos;post&apos;&gt;</span><br><span class="line"></span><br><span class="line">&lt;input type=&apos;submit&apos; value = &apos;Delete&apos;&gt;</span><br><span class="line">&lt;/form&gt;</span><br><span class="line">&lt;a href = &quot;&#123;&#123; url_for(&apos;hello_world&apos;)&#125;&#125;&quot;&gt; Cancel &lt;/a&gt;</span><br><span class="line">&lt;/body&gt;</span><br><span class="line"></span><br><span class="line">&lt;/html</span><br></pre></td></tr></table></figure></div></p>

      
    </div>
    
  </div>
  
  
</article>

  
    <article id="post-flask/Flask-数据显示，jinja模板" class="article global-container article-type-post" itemscope="" itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 itemprop="name">
      <a class="article-title" href="/huafeihua/2019/01/22/flask/Flask-数据显示，jinja模板/">flask-数据显示，jinja模板</a>
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/huafeihua/2019/01/22/flask/Flask-数据显示，jinja模板/" class="article-date">
  <time datetime="2019-01-22T08:58:59.000Z" itemprop="datePublished">2019-01-22</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/huafeihua/categories/python/">python</a>
  </div>

    
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/huafeihua/tags/flask/">flask</a></li></ul>

  </div>
  

  <div class="article-inner">
    
    <div class="article-content article-content-doorframe" itemprop="articleBody">
      
        <p>##脚本程序<br><div class="highlight-box" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true" data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre></td><td class="code"><pre><span class="line">#-*-coding:UTF-8 -*-</span><br><span class="line">from flask import Flask, redirect, render_template  </span><br><span class="line">from flask.globals import request</span><br><span class="line">from flask_bootstrap import Bootstrap</span><br><span class="line"></span><br><span class="line">app = Flask(__name__)</span><br><span class="line"></span><br><span class="line">goods = [&apos;apple&apos;,&apos;orange&apos;,&apos;juice&apos;]</span><br><span class="line"></span><br><span class="line">@app.route(&apos;/&apos;)</span><br><span class="line">def home():</span><br><span class="line">    return &apos;&lt;h1&gt;Home1&lt;/h1&gt;&apos;</span><br><span class="line"></span><br><span class="line">@app.route(&apos;/hello/&lt;name&gt;&apos;)</span><br><span class="line">def hello_world(name):</span><br><span class="line">    return render_template(&apos;hello.html&apos;, name=name,goods = goods)</span><br><span class="line">@app.route(&apos;/login&apos;)</span><br><span class="line">def login():</span><br><span class="line">    return &apos;login.page&apos;</span><br><span class="line"></span><br><span class="line">if __name__ ==&quot;__main__&quot;:</span><br><span class="line">    app.debug=True</span><br><span class="line">    app.run(host=&apos;0.0.0.0&apos;, port=8080)</span><br></pre></td></tr></table></figure></div></p>
<h2 id="衍生模板hello-html"><a href="#衍生模板hello-html" class="headerlink" title="衍生模板hello.html:"></a>衍生模板hello.html:</h2><div class="highlight-box" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true" data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">&#123;% extends &quot;testbase.html&quot; %&#125;</span><br><span class="line">&#123;% block title %&#125;Index1 &#123;%  endblock %&#125;</span><br><span class="line">&#123;% block body %&#125;</span><br><span class="line">&lt;h1&gt;Hello,&#123;&#123;name&#125;&#125;&lt;/h1&gt;</span><br><span class="line">Welcome to my program.</span><br><span class="line">&lt;ul&gt;</span><br><span class="line">&#123;% for i in goods: %&#125;</span><br><span class="line">	&lt;li&gt;&#123;&#123; i &#125;&#125;&lt;/li&gt;</span><br><span class="line">	&lt;a href=&quot;#&quot;&gt;Edit&lt;/a&gt;</span><br><span class="line">	&lt;/br&gt;&lt;a href=&quot;#&quot;&gt;Delete&lt;/a&gt;</span><br><span class="line">&#123;% endfor %&#125;</span><br><span class="line">&lt;/ul&gt;	</span><br><span class="line"></span><br><span class="line">&#123;% endblock %&#125;</span><br></pre></td></tr></table></figure></div>
<p>##基模板tsetbase.html:</p>
<pre><code>&lt;html&gt;
  &lt;head&gt;{% block head %}
	    <title>
	  {% block title %}{% endblock %} --My Application
        &lt;/title&gt;
    {% endblock %}

  &lt;/head&gt;
      &lt;body&gt;
      {% block body %}
	    <p>This is my first program.</p>
	  {% endblock %}
      &lt;/body&gt;
&lt;/html&gt;
</title></code></pre><p>##效果如下：</p>
<p><img src="http://upload-images.jianshu.io/upload_images/4805565-1438e3e369ca4f53.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="效果图.png"></p>

      
    </div>
    
  </div>
  
  
</article>

  
    <article id="post-flask/WTForms" class="article global-container article-type-post" itemscope="" itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 itemprop="name">
      <a class="article-title" href="/huafeihua/2019/01/22/flask/WTForms/">flask-WTForms支持的HTML标准字段</a>
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/huafeihua/2019/01/22/flask/WTForms/" class="article-date">
  <time datetime="2019-01-22T08:58:59.000Z" itemprop="datePublished">2019-01-22</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/huafeihua/categories/python/">python</a>
  </div>

    
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/huafeihua/tags/flask/">flask</a></li></ul>

  </div>
  

  <div class="article-inner">
    
    <div class="article-content article-content-doorframe" itemprop="articleBody">
      
        <p>WTForms支持的HTML标准字段<br><div class="highlight-box" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true" data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">字段类型      说　　明</span><br><span class="line">StringField 文本字段</span><br><span class="line">TextAreaField 多行文本字段</span><br><span class="line">PasswordField 密码文本字段</span><br><span class="line">HiddenField 隐藏文本字段</span><br><span class="line">DateField 文本字段，值为 datetime.date 格式</span><br><span class="line">DateTimeField 文本字段，值为 datetime.datetime 格式</span><br><span class="line">IntegerField 文本字段，值为整数</span><br><span class="line">DecimalField 文本字段，值为 decimal.Decimal</span><br><span class="line">FloatField 文本字段，值为浮点数</span><br><span class="line">BooleanField 复选框，值为 True 和 False</span><br><span class="line">RadioField 一组单选框</span><br><span class="line">SelectField 下拉列表</span><br><span class="line">SelectMultipleField 下拉列表，可选择多个值</span><br><span class="line">FileField 文件上传字段</span><br><span class="line">SubmitField 表单提交按钮</span><br><span class="line">FormField 把表单作为字段嵌入另一个表单</span><br><span class="line">FieldList 一组指定类型的字段</span><br></pre></td></tr></table></figure></div></p>
<p>常见的验证函数<br><div class="highlight-box" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true" data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">验证函数 说　　明</span><br><span class="line">Email 验证电子邮件地址</span><br><span class="line">EqualTo 比较两个字段的值；常用于要求输入两次密码进行确认的情况</span><br><span class="line">IPAddress 验证 IPv4 网络地址</span><br><span class="line">Length 验证输入字符串的长度</span><br><span class="line">NumberRange 验证输入的值在数字范围内</span><br><span class="line">Optional 无输入值时跳过其他验证函数</span><br><span class="line">Required 确保字段中有数据</span><br><span class="line">Regexp 使用正则表达式验证输入值</span><br><span class="line">URL 验证 URL</span><br><span class="line">AnyOf 确保输入值在可选值列表中</span><br><span class="line">NoneOf 确保输入值不在可选值列表中</span><br></pre></td></tr></table></figure></div></p>

      
    </div>
    
  </div>
  
  
</article>

  
    <article id="post-自动化/Appium" class="article global-container article-type-post" itemscope="" itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 itemprop="name">
      <a class="article-title" href="/huafeihua/2019/01/22/自动化/Appium/">Appium</a>
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/huafeihua/2019/01/22/自动化/Appium/" class="article-date">
  <time datetime="2019-01-22T08:58:59.000Z" itemprop="datePublished">2019-01-22</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/huafeihua/categories/自动化/">自动化</a>
  </div>

    
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/huafeihua/tags/Appium/">Appium</a></li></ul>

  </div>
  

  <div class="article-inner">
    
    <div class="article-content article-content-doorframe" itemprop="articleBody">
      
        <p>avd<br>ui automater<br>apppium server</p>
<p>驱动连接</p>
<p>from appium import webderiver<br>caps[]<br>caps[‘platform’] = ‘android’<br>caps[‘remote’] = ‘’<br>caps[‘’] = </p>

      
    </div>
    
  </div>
  
  
</article>

  
    <article id="post-自动化/webdriver-清除浏览器缓存操作" class="article global-container article-type-post" itemscope="" itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 itemprop="name">
      <a class="article-title" href="/huafeihua/2019/01/22/自动化/webdriver-清除浏览器缓存操作/">webdriver-清除浏览器缓存</a>
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/huafeihua/2019/01/22/自动化/webdriver-清除浏览器缓存操作/" class="article-date">
  <time datetime="2019-01-22T08:58:59.000Z" itemprop="datePublished">2019-01-22</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/huafeihua/categories/自动化/">自动化</a>
  </div>

    
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/huafeihua/tags/Selenium/">Selenium</a></li></ul>

  </div>
  

  <div class="article-inner">
    
    <div class="article-content article-content-doorframe" itemprop="articleBody">
      
        <p>直接走起！<br><div class="highlight-box" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true" data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">from seleniumimport webdriver</span><br><span class="line"></span><br><span class="line">from selenium.webdriver.common.keysimport Keys</span><br><span class="line"></span><br><span class="line">from selenium.webdriver.common.action_chains import ActionChains</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">def clear_brow_data():</span><br><span class="line"></span><br><span class="line">driver.get(&quot;chrome://settings/clearBrowserData&quot;)</span><br><span class="line"></span><br><span class="line">time.sleep(3)</span><br><span class="line"></span><br><span class="line">action = ActionChains(driver)</span><br><span class="line"></span><br><span class="line">action.key_down(Keys.ENTER).key_up(Keys.ENTER).perform()</span><br></pre></td></tr></table></figure></div></p>
<p>当然还有其他方法 宗旨是一致的！</p>

      
    </div>
    
  </div>
  
  
</article>

  
    <article id="post-自动化/Selenium-驱动" class="article global-container article-type-post" itemscope="" itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 itemprop="name">
      <a class="article-title" href="/huafeihua/2019/01/22/自动化/Selenium-驱动/">Selenium驱动</a>
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/huafeihua/2019/01/22/自动化/Selenium-驱动/" class="article-date">
  <time datetime="2019-01-22T08:58:59.000Z" itemprop="datePublished">2019-01-22</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/huafeihua/categories/自动化/">自动化</a>
  </div>

    
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/huafeihua/tags/Selenium/">Selenium</a></li></ul>

  </div>
  

  <div class="article-inner">
    
    <div class="article-content article-content-doorframe" itemprop="articleBody">
      
        <p>##1 验证驱动<br>可以将驱动放到一个文件夹，添加到环境变量<br>from selenium import webdriver</p>
<p>driver = webdriver.Firefox()<br>driver = webdriver.Chrome()<br>driver = webdriver.Ie()<br>driver = webdriver.Edge()<br>driver = webdriver.Opera()</p>
<p>##2 定位方法<br>id<br>name<br>class name<br>tag name<br>link text<br>partial link text<br>xpath<br>css selector<br>这8种定位方式在Python selenium中所对应的方法为：</p>
<p>find_element_by_id()<br>find_element_by_name()<br>find_element_by_class_name()<br>find_element_by_tag_name()<br>find_element_by_link_text()<br>find_element_by_partial_link_text()<br>find_element_by_xpath()<br>find_element_by_css_selector()</p>
<p>##3 控制浏览器<br>set_window_size(400,800)<br>set_window_size()<br>driver.back()<br>driver.forward()<br>driver.refresh() #刷新</p>
<p>clear()<br>send_keys()<br>click()<br>ele.submit()</p>
<p>##4其他<br>size  返回尺寸<br>text 获取文本<br>get_attribute(name) 获取属性<br>is_displayed()  是否用户可见</p>
<p>##鼠标事件<br>from selenium.webdriver import ActionChains<br>ActionChains(driver).<em>**</em></p>
<p>context_click()  右击<br>double_click()  双击<br>drag_and_trop() 拖动<br>move_to_element() 悬停</p>
<p>##键盘<br>from selenium.webdriver.common.keys import Keys<br>Keys.BACK_SPACE<br>Keys.CONTROL, ‘a’    (c, v)<br>Keys.ENTER<br>send_keys(Keys.BACK_SPACE) 删除键（BackSpace）</p>
<p>send_keys(Keys.SPACE) 空格键(Space)</p>
<p>send_keys(Keys.TAB) 制表键(Tab)</p>
<p>send_keys(Keys.ESCAPE) 回退键（Esc）</p>
<p>send_keys(Keys.ENTER) 回车键（Enter）</p>
<p>send_keys(Keys.CONTROL,‘a’) 全选（Ctrl+A）</p>
<p>send_keys(Keys.CONTROL,‘c’) 复制（Ctrl+C）</p>
<p>send_keys(Keys.CONTROL,‘x’) 剪切（Ctrl+X）</p>
<p>send_keys(Keys.CONTROL,‘v’) 粘贴（Ctrl+V）</p>
<p>send_keys(Keys.F1) 键盘 F1</p>
<p>……</p>
<p>send_keys(Keys.F12) 键盘 F12</p>
<p>##等待<br>显式<br>WebDriverWait(driver, timeout, poll_frequency=0.5, ignored_exceptions=None)</p>
<p>driver ：浏览器驱动。<br>timeout ：最长超时时间，默认以秒为单位。<br>poll_frequency ：检测的间隔（步长）时间，默认为0.5S。<br>ignored_exceptions ：超时后的异常信息，默认情况下抛NoSuchElementException异常。<br>WebDriverWait()一般由until()或until_not()方法配合使用，下面是until()和until_not()方法的说明。 <em> until(method, message=‘’) 调用该方法提供的驱动程序作为一个参数，直到返回值为True。 </em> until_not(method, message=‘’) 调用该方法提供的驱动程序作为一个参数，直到返回值为False。</p>
<p>在本例中，通过as关键字将expected_conditions 重命名为EC，并调用presence_of_element_located()方法判断元素是否存在<br>隐式</p>
<h3 id="设置隐式等待为10秒"><a href="#设置隐式等待为10秒" class="headerlink" title="设置隐式等待为10秒"></a>设置隐式等待为10秒</h3><p>driver.implicitly_wait(10)</p>
<p>switch_to.frame()  id或name<br>也可以先定位对象 把对象传给frame<br>driver.switch_to.parent_frame()<br>switch_to.default_content()  跳回到最外层</p>
<p>###警告框<br>driver.switch_to.alert.accept()</p>
<p>text：返回 alert/confirm/prompt 中的文字信息。</p>
<p>accept()：接受现有警告框。</p>
<p>dismiss()：解散现有警告框。</p>
<p>send_keys(keysToSend)：发送文本至警告框。keysToSend：将文本发送至警告框。</p>
<p>###下拉选择框<br>from selenium.webdriver.support.select improt Select<br>s_ele = webdriver.find_ele<br>Select(s_ele).select_by_value(value)</p>
<p>###上传文件<br>input<br>ele = find<br>ele.send_keys(文件)</p>
<p>###cookie处理<br>WebDriver操作cookie的方法：</p>
<p>get_cookies()： 获得所有cookie信息。</p>
<p>get_cookie(name)： 返回字典的key为“name”的cookie信息。</p>
<p>add_cookie(cookie_dict) ： 添加cookie。“cookie_dict”指字典对象，必须有name 和value 值。</p>
<p>delete_cookie(name,optionsString)：删除cookie信息。“name”是要删除的cookie的名称，“optionsString”是该cookie的选项，目前支持的选项包括“路径”，“域”。</p>
<p>delete_all_cookies()： 删除所有cookie信息。</p>
<p>###调用js<br>控制滚动条移动<br>js=”window.scrollTo(100,450);”<br>driver.execute_script(js)<br>sleep(3)</p>
<p>###保存图片<br>path = r’D:\shot.png’<br>方法：driver.get_screenshot_as_file(path)</p>
<p>##关闭窗口</p>
<ul>
<li>close()  关闭当前</li>
<li>quit()  退出驱动，关闭所有窗口</li>
</ul>

      
    </div>
    
  </div>
  
  
</article>

  
    <article id="post-flask/WTForms支持的HTML标准字段" class="article global-container article-type-post" itemscope itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 itemprop="name">
      <a class="article-title" href="/huafeihua/2019/01/22/flask/WTForms支持的HTML标准字段/">flask-WTForms支持的HTML标准字段</a>
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/huafeihua/2019/01/22/flask/WTForms支持的HTML标准字段/" class="article-date">
  <time datetime="2019-01-22T08:58:59.000Z" itemprop="datePublished">2019-01-22</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/huafeihua/categories/python/">python</a>
  </div>

    
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/huafeihua/tags/flask/">flask</a></li></ul>

  </div>
  

  <div class="article-inner">
    
    <div class="article-content article-content-doorframe" itemprop="articleBody">
      
        
<!DOCTYPE html>
<html lang="en">
  <head><meta name="generator" content="Hexo 3.8.0">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>WTForms支持的HTML标准字段</title>
    <style type="text/css" media="all">
      body {
        margin: 0;
        font-family: "Helvetica Neue", Helvetica, Arial, "Hiragino Sans GB", sans-serif;
        font-size: 14px;
        line-height: 20px;
        color: #777;
        background-color: white;
      }
      .container {
        width: 700px;
        margin-right: auto;
        margin-left: auto;
      }

      .post {
        font-family: Georgia, "Times New Roman", Times, "SimSun", serif;
        position: relative;
        padding: 70px;
        bottom: 0;
        overflow-y: auto;
        font-size: 16px;
        font-weight: normal;
        line-height: 25px;
        color: #515151;
      }

      .post h1{
        font-size: 50px;
        font-weight: 500;
        line-height: 60px;
        margin-bottom: 40px;
        color: inherit;
      }

      .post p {
        margin: 0 0 35px 0;
      }

      .post img {
        border: 1px solid #D9D9D9;
      }

      .post a {
        color: #28A1C5;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="post">
        <h1 class="title">WTForms支持的HTML标准字段</h1>
        <div class="show-content">
          <p>表4-1 WTForms支持的HTML标准字段<br></p><p>字段类型 说　　明</p><p>StringField文本字段</p><p>TextAreaField多行文本字段</p><p>PasswordField密码文本字段</p><p>HiddenField隐藏文本字段</p><p>DateField文本字段，值为dateti</p><p>DateTimeField文本字段，值为dateti</p><p>IntegerField文本字段，值为整数</p><p>DecimalField文本字段，值为decima</p><p>FloatField文本字段，值为浮点数</p><p>BooleanField复选框，值为True和F</p><p>RadioField一组单选框</p><p>SelectField下拉列表</p><p>SelectMultipleField下拉列表，可选择多个</p><p>FileField文件上传字段</p><p>SubmitField表单提交按钮</p><p>FormField把表单作为字段嵌入另</p><p>FieldList一组指定类型的字段</p>
        </div>
      </div>
    </div>
  </body>
</html>

      
    </div>
    
  </div>
  
  
</article>

  
    <article id="post-随笔/简书如何备份文章" class="article global-container article-type-post" itemscope="" itemprop="blogPost">
  
  <div class="article-meta">
    <a href="/huafeihua/2019/01/22/随笔/简书如何备份文章/" class="article-date">
  <time datetime="2019-01-22T08:32:45.602Z" itemprop="datePublished">2019-01-22</time>
</a>
    
    
  </div>
  

  <div class="article-inner">
    
    <div class="article-content article-content-doorframe" itemprop="articleBody">
      
        <p>#科普内容<br>有些小伙伴在简书上写了很多有内涵的文章。<br>有时有需求要备份下载下来或在其他地方用。</p>
<p> 1.鼠标放在头像-点击设置</p>
<p><img src="https://upload-images.jianshu.io/upload_images/4805565-5f58c07c5d946002.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="点击设置"><br>2.下载文章 下载的文章为md格式<br><img src="https://upload-images.jianshu.io/upload_images/4805565-b7caee35e563db63.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="下载文章"></p>

      
    </div>
    
  </div>
  
  
</article>

  


  <nav id="page-nav">
    
    <a class="extend prev" rel="prev" href="/huafeihua/page/3/">&laquo; 上一页</a><a class="page-number" href="/huafeihua/">1</a><a class="page-number" href="/huafeihua/page/2/">2</a><a class="page-number" href="/huafeihua/page/3/">3</a><span class="page-number current">4</span><a class="page-number" href="/huafeihua/page/5/">5</a><a class="page-number" href="/huafeihua/page/6/">6</a><a class="extend next" rel="next" href="/huafeihua/page/5/">下一页 &raquo;</a>
  </nav>


</section>
        <aside id="sidebar">
  
    <div class="widget-box">
  <div class="avatar-box">
    <img class="avatar" src="/huafeihua/images/default-avatar.jpeg" title="图片来自网络">
    <h3 class="avatar-name">
      
        听风看雨
      
    </h3>
    <p class="avatar-slogan">
      抗揍的愤青，半个IT男。
    </p>
  </div>
</div>


  
    
  <div class="widget-box">
    <h3 class="widget-title">分类</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/huafeihua/categories/Linux/">Linux</a></li><li class="category-list-item"><a class="category-list-link" href="/huafeihua/categories/python/">python</a></li><li class="category-list-item"><a class="category-list-link" href="/huafeihua/categories/入坑/">入坑</a></li><li class="category-list-item"><a class="category-list-link" href="/huafeihua/categories/技巧/">技巧</a></li><li class="category-list-item"><a class="category-list-link" href="/huafeihua/categories/自动化/">自动化</a></li><li class="category-list-item"><a class="category-list-link" href="/huafeihua/categories/项目管理/">项目管理</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-box">
    <h3 class="widget-title">标签</h3>
    <div class="widget">
      <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/Appium/">Appium</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/Docker/">Docker</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/Jenkins/">Jenkins</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/Nginx/">Nginx</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/Selenium/">Selenium</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/Ubuntu/">Ubuntu</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/centos/">centos</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/flask/">flask</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/python/">python</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/rabbit/">rabbit</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/sql/">sql</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/ubuntu/">ubuntu</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/效率/">效率</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/爬虫/">爬虫</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-box">
    <h3 class="widget-title">标签云</h3>
    <div class="widget tagcloud">
      <a href="/huafeihua/tags/Appium/" style="font-size: 10px;">Appium</a> <a href="/huafeihua/tags/Docker/" style="font-size: 13.33px;">Docker</a> <a href="/huafeihua/tags/Jenkins/" style="font-size: 10px;">Jenkins</a> <a href="/huafeihua/tags/Nginx/" style="font-size: 10px;">Nginx</a> <a href="/huafeihua/tags/Selenium/" style="font-size: 13.33px;">Selenium</a> <a href="/huafeihua/tags/Ubuntu/" style="font-size: 10px;">Ubuntu</a> <a href="/huafeihua/tags/centos/" style="font-size: 16.67px;">centos</a> <a href="/huafeihua/tags/flask/" style="font-size: 20px;">flask</a> <a href="/huafeihua/tags/python/" style="font-size: 20px;">python</a> <a href="/huafeihua/tags/rabbit/" style="font-size: 10px;">rabbit</a> <a href="/huafeihua/tags/sql/" style="font-size: 10px;">sql</a> <a href="/huafeihua/tags/ubuntu/" style="font-size: 10px;">ubuntu</a> <a href="/huafeihua/tags/效率/" style="font-size: 10px;">效率</a> <a href="/huafeihua/tags/爬虫/" style="font-size: 10px;">爬虫</a>
    </div>
  </div>

  
    
  <div class="widget-box">
    <h3 class="widget-title">归档</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/huafeihua/archives/2019/01/">一月 2019</a></li></ul>
    </div>
  </div>

  
    
  <div class="widget-box">
    <h3 class="widget-title">最新文章</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/huafeihua/2019/01/29/python-mq/">python rabbitmq</a>
          </li>
        
          <li>
            <a href="/huafeihua/2019/01/22/python/Unittest/">Python-Unittest</a>
          </li>
        
          <li>
            <a href="/huafeihua/2019/01/22/项目管理/项目管理2018-07-23/">U项目管理</a>
          </li>
        
          <li>
            <a href="/huafeihua/2019/01/22/随笔/-Kanboard-安装之Windows/">Kanboard 安装之Windows</a>
          </li>
        
          <li>
            <a href="/huafeihua/2019/01/22/运维部署/单网卡实现内外网访问/">单网卡实现内外网访问</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
      </div>
      <footer id="footer">
  <div class="foot-box global-width">
    &copy; 2019 Edwin Ma &nbsp;&nbsp;
    驱动于 <a href="http://hexo.io/" target="_blank">Hexo</a><br>
    <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span id="busuanzi_container_site_pv">阁下是第<span id="busuanzi_value_site_pv"></span>个访客</span>
  </div>
</footer>
      <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>

<script src="/js/jquery-2.0.3.min.js"></script>

  <link rel="stylesheet" href="/huafeihua/fancybox/jquery.fancybox.css">
  <script src="/huafeihua/fancybox/jquery.fancybox.pack.js"></script>


<script src="/huafeihua/js/script.js"></script>



    </div>
    <nav id="mobile-nav" class="mobile-nav-box">
  <div class="mobile-nav-img mobile-nav-top"></div>
  
    <a href="/huafeihua/" class="mobile-nav-link">首页</a>
  
    <a href="/huafeihua/categories" class="mobile-nav-link">分类</a>
  
    <a href="/huafeihua/archives" class="mobile-nav-link">归档</a>
  
    <a href="/huafeihua/tags" class="mobile-nav-link">标签</a>
  
    <a href="/huafeihua/about" class="mobile-nav-link">关于</a>
  
  <div class="mobile-nav-img  mobile-nav-bottom"></div>
</nav>    
  </div>
</body>
</html>